.\" Manpage for vcftools.
.TH vcftools man page 1 "2 August 2018" "0.1.17" "vcftools man page"
.SH NAME
vcftools v0.1.17 \- Utilities for the variant call format (VCF) and binary variant call format (BCF)
.SH SYNOPSIS
.B vcftools
[
.B --vcf
FILE | 
.B --gzvcf 
FILE |
.B --bcf
FILE] [
.B --out
OUTPUT PREFIX ]
[ FILTERING OPTIONS ]  [ OUTPUT OPTIONS ]
.SH DESCRIPTION
vcftools is a suite of functions for use on genetic variation data in the form of VCF and BCF files. The tools provided will be used mainly to summarize data, run calculations on data, filter out data, and convert data into other useful file formats.
.SH EXAMPLES
Output allele frequency for all sites in the input vcf file from chromosome 1
.RS 2
.B vcftools 
--gzvcf input_file.vcf.gz --freq --chr 1 --out chr1_analysis
.RE
.PP
Output a new vcf file from the input vcf file that removes any indel sites
.RS 2
.B vcftools 
--vcf input_file.vcf --remove-indels --recode --recode-INFO-all --out SNPs_only
.RE
.PP
Output file comparing the sites in two vcf files
.RS 2
.B vcftools  
--gzvcf input_file1.vcf.gz --gzdiff input_file2.vcf.gz --diff-site --out in1_v_in2
.RE
.PP
Output a new vcf file to standard out without any sites that have a filter tag, then compress it with gzip
.RS 2
.B vcftools  
--gzvcf input_file.vcf.gz --remove-filtered-all --recode --stdout | gzip -c > output_PASS_only.vcf.gz
.RE
.PP
Output a Hardy-Weinberg p-value for every site in the bcf file that does not have any missing genotypes
.RS 2
.B vcftools  
--bcf input_file.bcf --hardy --max-missing 1.0 --out output_noMissing
.RE
.PP
Output nucleotide diversity at a list of positions
.RS 2
zcat input_file.vcf.gz | 
.B vcftools
--vcf - --site-pi --positions SNP_list.txt --out nucleotide_diversity
.SH BASIC OPTIONS
These options are used to specify the input and output files.
.SS INPUT FILE OPTIONS
.RS 2
.B --vcf 
.I <input_filename> 
.RS 2
This option defines the VCF file to be processed. VCFtools expects files in VCF format v4.0, v4.1 or v4.2. The latter two are supported with some small limitations. If the user provides a dash character '-' as a file name, the program expects a VCF file to be piped in through standard in.
.RE
.PP
.B --gzvcf 
.I <input_filename> 
.RS 2
This option can be used in place of the --vcf option to read compressed (gzipped) VCF files directly.
.RE
.PP
.B --bcf 
.I <input_filename> 
.RS 2
This option can be used in place of the --vcf option to read BCF2 files directly. You do not need to specify if this file is compressed with BGZF encoding. If the user provides a dash character '-' as a file name, the program expects a BCF2 file to be piped in through standard in.
.RE
.SS OUTPUT FILE OPTIONS
.RS 2
.B --out 
.I <output_prefix> 
.RS 2
This option defines the output filename prefix for all files generated by vcftools. For example, if <prefix> is set to output_filename, then all output files will be of the form output_filename.*** . If this option is omitted, all output files will have the prefix "out." in the current working directory.
.RE
.PP
.B --stdout
.br
.B -c
.RS 2
These options direct the vcftools output to standard out so it can be piped into another program or written directly to a filename of choice. However, a select few output functions cannot be written to standard out.
.RE
.PP
.B --temp
.I <temporary_directory> 
.RS 2
This option can be used to redirect any temporary files that vcftools creates into a specified directory.
.RE
.SH SITE FILTERING OPTIONS
These options are used to include or exclude certain sites from any analysis being performed by the program.
.SS POSITION FILTERING
.RS 2
.B --chr 
.I <chromosome>
.br
.B --not-chr
.I <chromosome>
.RS 2
Includes or excludes sites with indentifiers matching <chromosome>. These options may be used multiple times to include or exclude more than one chromosome.
.RE
.PP
.B --from-bp
.I <integer>
.br
.B --to-bp 
.I <integer>
.RS 2
These options specify a lower bound and upper bound for a range of sites to be processed. Sites with positions less than or greater than these values will be excluded. These options can only be used in conjunction with a single usage of --chr. Using one of these does not require use of the other.
.RE
.PP
.B --positions 
.I <filename>
.br
.B --exclude-positions 
.I <filename>
.RS 2
Include or exclude a set of sites on the basis of a list of positions in a file. Each line of the input file should contain a (tab-separated) chromosome and position. The file can have comment lines that start with a "#", they will be ignored. 
.RE
.PP
.B --positions-overlap 
.I <filename>
.br
.B --exclude-positions-overlap
.I <filename>
.RS 2
Include or exclude a set of sites on the basis of the reference allele overlapping with a list of positions in a file. Each line of the input file should contain a (tab-separated) chromosome and position. The file can have comment lines that start with a "#", they will be ignored. 
.RE
.PP
.B --bed 
.I <filename>
.br
.B --exclude-bed 
.I <filename>
.RS 2
Include or exclude a set of sites on the basis of a BED file. Only the first three columns (chrom, chromStart and chromEnd) are required. The BED file is expected to have a header line. A site will be kept or excluded if any part of any allele (REF or ALT) at a site is within the range of one of the BED entries. 
.RE
.PP
.B --thin 
.I <integer>
.RS 2 
Thin sites so that no two sites are within the specified distance from one another.
.RE
.PP
.B --mask 
.I <filename>
.br
.B --invert-mask 
.I <filename>
.br
.B --mask-min 
.I <integer>
.RS 2
These options are used to specify a FASTA-like mask file to filter with. The mask file contains a sequence of integer digits (between 0 and 9) for each position on a chromosome that specify if a site at that position should be filtered or not.
.br
An example mask file would look like:
.RS 2
.I >1
.br
.I 0000011111222...
.br
.I >2
.br
.I 2222211111000...
.RE
In this example, sites in the VCF file located within the first 5 bases of the start of chromosome 1 would be kept, whereas sites at position 6 onwards would be filtered out. And sites after the 11th position on chromosome 2 would be filtered out as well.
.br
The "--invert-mask" option takes the same format mask file as the "--mask" option, however it inverts the mask file before filtering with it.
.br
And the "--mask-min" option specifies a threshold mask value between 0 and 9 to filter positions by. The default threshold is 0, meaning only sites with that value or lower will be kept.
.RE
.SS SITE ID FILTERING 
.RS 2
.B --snp 
.I <string>
.RS 2
Include SNP(s) with matching ID (e.g. a dbSNP rsID). This command can be used multiple times in order to include more than one SNP.
.RE
.PP
.B --snps 
.I <filename>
.br
.B --exclude 
.I <filename>
.RS 2
Include or exclude a list of SNPs given in a file. The file should contain a list of SNP IDs (e.g. dbSNP rsIDs), with one ID per line. No header line is expected.
.RE
.SS VARIANT TYPE FILTERING
.RS 2
.B --keep-only-indels
.br
.B --remove-indels
.RS 2
Include or exclude sites that contain an indel. For these options "indel" means any variant that alters the length of the REF allele.
.RE
.SS FILTER FLAG FILTERING
.RS 2
.B --remove-filtered-all
.RS 2
Removes all sites with a FILTER flag other than PASS.
.RE
.PP
.B --keep-filtered 
.I <string>
.br
.B --remove-filtered 
.I <string>
.RS 2
Includes or excludes all sites marked with a specific FILTER flag. These options may be used more than once to specify multiple FILTER flags.
.RE
.SS INFO FIELD FILTERING
.RS 2
.B --keep-INFO 
.I <string>
.br
.B --remove-INFO 
.I <string>
.RS 2
Includes or excludes all sites with a specific INFO flag. These options only filter on the presence of the flag and not its value. These options can be used multiple times to specify multiple INFO flags.
.RE
.SS ALLELE FILTERING
.RS 2
.B --maf 
.I <float>
.br
.B --max-maf 
.I <float>
.RS 2
Include only sites with a Minor Allele Frequency greater than or equal to the "--maf" value and less than or equal to the "--max-maf" value. One of these options may be used without the other. Allele frequency is defined as the number of times an allele appears over all individuals at that site, divided by the total number of non-missing alleles at that site.
.RE
.PP
.B --non-ref-af 
.I <float>
.br
.B --max-non-ref-af 
.I <float>
.br
.B --non-ref-ac 
.I <integer>
.br
.B --max-non-ref-ac 
.I <integer>
.PP
.B --non-ref-af-any 
.I <float>
.br
.B --max-non-ref-af-any 
.I <float>
.br
.B --non-ref-ac-any
.I <integer>
.br
.B --max-non-ref-ac-any 
.I <integer>
.RS 2
Include only sites with all Non-Reference (ALT) Allele Frequencies (af) or Counts (ac) within the range specified, and including the specified value. The default options require 
.B all
alleles to meet the specified criteria, whereas the options appended with "any" require only one allele to meet the criteria. The Allele frequency is defined as the number of times an allele appears over all individuals at that site, divided by the total number of non-missing alleles at that site.
.RE
.PP
.B --mac 
.I <integer>
.br
.B --max-mac 
.I <integer>
.RS 2
Include only sites with Minor Allele Count greater than or equal to the "--mac" value and less than or equal to the "--max-mac" value. One of these options may be used without the other. Allele count is simply the number of times that allele appears over all individuals at that site.
.RE
.PP
.B --min-alleles 
.I <integer>
.br
.B --max-alleles 
.I <integer>
.RS 2
Include only sites with a number of alleles greater than or equal to the "--min-alleles" value and less than or equal to the "--max-alleles" value. One of these options may be used without the other.
.br
For example, to include only bi-allelic sites, one could use:
.br
.RS 2
.B vcftools 
--vcf file1.vcf --min-alleles 2 --max-alleles 2
.RE
.SS GENOTYPE VALUE FILTERING
.RS 2
.B --min-meanDP 
.I <float>
.br
.B --max-meanDP 
.I <float>
.RS 2
Includes only sites with mean depth values (over all included individuals) greater than or equal to the "--min-meanDP" value and less than or equal to the "--max-meanDP" value. One of these options may be used without the other. These options require that the "DP" FORMAT tag is included for each site. 
.RE
.PP
.B --hwe 
.I <float>
.RS 2
Assesses sites for Hardy-Weinberg Equilibrium using an exact test, as defined by Wigginton, Cutler and Abecasis (2005). Sites with a p-value below the threshold defined by this option are taken to be out of HWE, and therefore excluded.
.RE
.PP
.B --max-missing 
.I <float>
.RS 2
Exclude sites on the basis of the proportion of missing data (defined to be between 0 and 1, where 0 allows sites that are completely missing and 1 indicates no missing data allowed).
.RE
.PP
.B --max-missing-count 
.I <integer>
.RS 2
Exclude sites with more than this number of missing genotypes over all individuals.
.RE
.PP
.B --phased
.RS 2
Excludes all sites that contain unphased genotypes.
.RE
.SS MISCELLANEOUS FILTERING
.RS 2
.B --minQ 
.I <float>
.RS 2
Includes only sites with Quality value above this threshold.
.RE
.SH INDIVIDUAL FILTERING OPTIONS
These options are used to include or exclude certain individuals from any analysis being performed by the program.
.br
.RS 2
.B --indv 
.I <string>
.br
.B --remove-indv 
.I <string>
.RS 2
Specify an individual to be kept or removed from the analysis. This option can be used multiple times to specify multiple individuals. If both options are specified, then the "--indv" option is executed before the "--remove-indv option". 
.RE
.PP
.B --keep 
.I <filename>
.br
.B --remove 
.I <filename>
.RS 2
Provide files containing a list of individuals to either include or exclude in subsequent analysis. Each individual ID (as defined in the VCF headerline) should be included on a separate line. If both options are used, then the "--keep" option is executed before the "--remove" option. When multiple files are provided, the union of individuals from all keep files subtracted by the union of individuals from all remove files are kept. No header line is expected.
.RE
.PP
.B --max-indv 
.I <integer>
.RS 2
Randomly thins individuals so that only the specified number are retained.
.RE
.SH GENOTYPE FILTERING OPTIONS
These options are used to exclude genotypes from any analysis being performed by the program. If excluded, these values will be treated as missing.
.br
.RS 2
.B --remove-filtered-geno-all
.RS 2
Excludes all genotypes with a FILTER flag not equal to "." (a missing value) or PASS.
.RE
.PP
.B --remove-filtered-geno 
.I <string>
.RS 2
Excludes genotypes with a specific FILTER flag.
.RE
.PP
.B --minGQ 
.I <float>
.RS 2
Exclude all genotypes with a quality below the threshold specified. This option requires that the "GQ" FORMAT tag is specified for all sites.
.RE
.PP
.B --minDP 
.I <float>
.br
.B --maxDP 
.I <float>
.RS 2
Includes only genotypes greater than or equal to the "--minDP" value and less than or equal to the "--maxDP" value. This option requires that the "DP" FORMAT tag is specified for all sites.
.RE
.SH OUTPUT OPTIONS
These options specify which analyses or conversions to perform on the data that passed through all specified filters.
.SS OUTPUT ALLELE STATISTICS
.RS 2
.B --freq
.br
.B --freq2
.RS 2
Outputs the allele frequency for each site in a file with the suffix ".frq". The second option is used to suppress output of any information about the alleles.
.RE
.PP
.B --counts
.br
.B --counts2
.RS 2
Outputs the raw allele counts for each site in a file with the suffix ".frq.count". The second option is used to suppress output of any information about the alleles.
.RE
.PP
.B --derived
.RS 2
For use with the previous four frequency and count options only. Re-orders the output file columns so that the ancestral allele appears first. This option relies on the ancestral allele being specified in the VCF file using the AA tag in the INFO field.
.RE
.SS OUTPUT DEPTH STATISTICS
.RS 2
.B --depth
.RS 2
Generates a file containing the mean depth per individual. This file has the suffix ".idepth".
.RE
.PP
.B --site-depth
.RS 2
Generates a file containing the depth per site summed across all individuals. This output file has the suffix ".ldepth".
.RE
.PP
.B --site-mean-depth
.RS 2
Generates a file containing the mean depth per site averaged across all individuals. This output file has the suffix ".ldepth.mean".
.RE
.PP
.B --geno-depth
.RS 2
Generates a (possibly very large) file containing the depth for each genotype in the VCF file. Missing entries are given the value -1. The file has the suffix ".gdepth".
.RE
.SS OUTPUT LD STATISTICS
.RS 2
.B --hap-r2
.RS 2
Outputs a file reporting the r2, D, and D' statistics using phased haplotypes. These are the traditional measures of LD often reported in the population genetics literature. The output file has the suffix ".hap.ld". This option assumes that the VCF input file has phased haplotypes.
.RE
.PP
.B --geno-r2
.RS 2
Calculates the squared correlation coefficient between genotypes encoded as 0, 1 and 2 to represent the number of non-reference alleles in each individual. This is the same as the LD measure reported by PLINK. The D and D' statistics are only available for phased genotypes. The output file has the suffix ".geno.ld".
.RE
.PP
.B --geno-chisq
.RS 2
If your data contains sites with more than two alleles, then this option can be used to test for genotype independence via the chi-squared statistic. The output file has the suffix ".geno.chisq".
.RE
.PP
.B --hap-r2-positions
.I <positions list file>
.br
.B --geno-r2-positions
.I <positions list file>
.RS 2
Outputs a file reporting the r2 statistics of the sites contained in the provided file verses all other sites. The output files have the suffix ".list.hap.ld" or ".list.geno.ld", depending on which option is used.
.RE
.PP
.B --ld-window 
.I <integer>
.RS 2
This optional parameter defines the maximum number of SNPs between the SNPs being tested for LD in the "--hap-r2", "--geno-r2", and "--geno-chisq" functions.
.RE
.PP
.B --ld-window-bp 
.I <integer>
.RS 2
This optional parameter defines the maximum number of physical bases between the SNPs being tested for LD in the "--hap-r2", "--geno-r2", and "--geno-chisq" functions.
.RE
.PP
.B --ld-window-min 
.I <integer>
.RS 2
This optional parameter defines the minimum number of SNPs between the SNPs being tested for LD in the "--hap-r2", "--geno-r2", and "--geno-chisq" functions.
.RE
.PP
.B --ld-window-bp-min
.I <integer>
.RS 2
This optional parameter defines the minimum number of physical bases between the SNPs being tested for LD in the "--hap-r2", "--geno-r2", and "--geno-chisq" functions.
.RE
.PP
.B --min-r2 
.I <float>
.RS 2
This optional parameter sets a minimum value for r2, below which the LD statistic is not reported by the "--hap-r2", "--geno-r2", and "--geno-chisq" functions.
.RE
.PP
.B --interchrom-hap-r2
.br
.B --interchrom-geno-r2
.RS 2
Outputs a file reporting the r2 statistics for sites on different chromosomes. The output files have the suffix ".interchrom.hap.ld" or ".interchrom.geno.ld", depending on the option used.
.RE
.SS OUTPUT TRANSITION/TRANSVERSION STATISTICS
.RS 2
.B --TsTv 
.I <integer>
.RS 2
Calculates the Transition / Transversion ratio in bins of size defined by this option. Only uses bi-allelic SNPs. The resulting output file has the suffix ".TsTv".
.RE
.PP
.B --TsTv-summary
.RS 2
Calculates a simple summary of all Transitions and Transversions. The output file has the suffix ".TsTv.summary".
.RE
.PP
.B --TsTv-by-count
.RS 2
Calculates the Transition / Transversion ratio as a function of alternative allele count. Only uses bi-allelic SNPs. The resulting output file has the suffix ".TsTv.count". 
.RE
.PP
.B --TsTv-by-qual
.RS 2
Calculates the Transition / Transversion ratio as a function of SNP quality threshold. Only uses bi-allelic SNPs. The resulting output file has the suffix ".TsTv.qual". 
.RE
.PP
.B --FILTER-summary
.RS 2
Generates a summary of the number of SNPs and Ts/Tv ratio for each FILTER category. The output file has the suffix ".FILTER.summary". 
.RE
.SS OUTPUT NUCLEOTIDE DIVERGENCE STATISTICS
.RS 2
.B --site-pi
.RS 2
Measures nucleotide divergency on a per-site basis. The output file has the suffix ".sites.pi".
.RE
.PP
.B --window-pi 
.I <integer> 
.br
.B --window-pi-step 
.I <integer>
.RS 2
Measures the nucleotide diversity in windows, with the number provided as the window size. The output file has the suffix ".windowed.pi". The latter is an optional argument used to specify the step size in between windows.
.RE
.SS OUTPUT FST STATISTICS
.RS 2
.B --weir-fst-pop 
.I <filename>
.RS 2
This option is used to calculate an Fst estimate from Weir and Cockerham's 1984 paper. This is the preferred calculation of Fst. The provided file must contain a list of individuals (one individual per line) from the VCF file that correspond to one population. This option can be used multiple times to calculate Fst for more than two populations. These files will also be included as "--keep" options. By default, calculations are done on a per-site basis. The output file has the suffix ".weir.fst".
.RE
.PP
.B --fst-window-size 
.I <integer>
.br
.B --fst-window-step 
.I <integer>
.RS 2
These options can be used with "--weir-fst-pop" to do the Fst calculations on a windowed basis instead of a per-site basis. These arguments specify the desired window size and the desired step size between windows.
.RE
.SS OUTPUT OTHER STATISTICS
.RS 2
.B --het
.RS 2
Calculates a measure of heterozygosity on a per-individual basis. Specfically, the inbreeding coefficient, F, is estimated for each individual using a method of moments. The resulting file has the suffix ".het".
.RE
.PP
.B --hardy
.RS 2
Reports a p-value for each site from a Hardy-Weinberg Equilibrium test (as defined by Wigginton, Cutler and Abecasis (2005)). The resulting file (with suffix ".hwe") also contains the Observed numbers of Homozygotes and Heterozygotes and the corresponding Expected numbers under HWE. 
.RE
.PP
.B --TajimaD 
.I <integer> 
.RS 2
Outputs Tajima's D statistic in bins with size of the specified number. The output file has the suffix ".Tajima.D".
.RE
.PP
.B --indv-freq-burden
.RS 2
This option calculates the number of variants within each individual of a specific frequency. The resulting file has the suffix ".ifreqburden".
.RE
.PP
.B --LROH
.RS 2
This option will identify and output Long Runs of Homozygosity. The output file has the suffix ".LROH". This function is experimental, and will use a lot of memory if applied to large datasets.
.RE
.PP
.B --relatedness 
.RS 2
This option is used to calculate and output a relatedness statistic based on the method of Yang et al, Nature Genetics 2010 (doi:10.1038/ng.608). Specifically, calculate the unadjusted Ajk statistic. Expectation of Ajk is zero for individuals within a populations, and one for an individual with themselves. The output file has the suffix ".relatedness".
.RE
.PP
.B --relatedness2
.RS 2
This option is used to calculate and output a relatedness statistic based on the method of Manichaikul et al., BIOINFORMATICS 2010 (doi:10.1093/bioinformatics/btq559). The output file has the suffix ".relatedness2".
.RE
.PP
.B --site-quality
.RS 2
Generates a file containing the per-site SNP quality, as found in the QUAL column of the VCF file. This file has the suffix ".lqual".
.RE
.PP
.B --missing-indv
.RS 2
Generates a file reporting the missingness on a per-individual basis. The file has the suffix ".imiss".
.RE
.PP
.B --missing-site
.RS 2
Generates a file reporting the missingness on a per-site basis. The file has the suffix ".lmiss".
.RE
.PP
.B --SNPdensity 
.I <integer>
.RS 2
Calculates the number and density of SNPs in bins of size defined by this option. The resulting output file has the suffix ".snpden".
.RE
.PP
.B --kept-sites
.RS 2
Creates a file listing all sites that have been kept after filtering. The file has the suffix ".kept.sites".
.RE
.PP
.B --removed-sites
.RS 2
Creates a file listing all sites that have been removed after filtering. The file has the suffix ".removed.sites".
.RE
.PP
.B --singletons
.RS 2
This option will generate a file detailing the location of singletons, and the individual they occur in. The file reports both true singletons, and private doubletons (i.e. SNPs where the minor allele only occurs in a single individual and that individual is homozygotic for that allele). The output file has the suffix ".singletons".
.RE
.PP
.B --hist-indel-len
.RS 2
This option will generate a histogram file of the length of all indels (including SNPs). It shows both the count and the percentage of all indels for indel lengths that occur at least once in the input file. SNPs are considered indels with length zero. The output file has the suffix ".indel.hist".
.RE
.PP
.B --hapcount
.I <BED file>
.RS 2
This option will output the number of unique haplotypes within user specified bins, as defined by the BED file. The output file has the suffix ".hapcount".
.RE
.PP
.B --mendel
.I <PED file>
.RS 2
This option is use to report mendel errors identified in trios. The command requires a PLINK-style PED file, with the first four columns specifying a family ID, the child ID, the father ID, and the mother ID. The output of this command has the suffix ".mendel".
.RE
.PP
.B --extract-FORMAT-info 
.I <string>
.RS 2
Extract information from the genotype fields in the VCF file relating to a specfied FORMAT identifier. The resulting output file has the suffix ".<FORMAT_ID>.FORMAT". For example, the following command would extract the all of the GT (i.e. Genotype) entries:
.br
.RS 2
.B vcftools
--vcf file1.vcf --extract-FORMAT-info GT
.RE
.RE
.PP
.B --get-INFO 
.I <string>
.RS 2
This option is used to extract information from the INFO field in the VCF file. The <string> argument specifies the INFO tag to be extracted, and the option can be used multiple times in order to extract multiple INFO entries. The resulting file, with suffix ".INFO", contains the required INFO information in a tab-separated table. For example, to extract the NS and DB flags, one would use the command: 
.br
.RS 2
.B vcftools 
--vcf file1.vcf --get-INFO NS --get-INFO DB
.RE
.SS OUTPUT VCF FORMAT
.RS 2
.B --recode
.br
.B --recode-bcf
.RS 2
These options are used to generate a new file in either VCF or BCF from the input VCF or BCF file after applying the filtering options specified by the user. The output file has the suffix ".recode.vcf" or ".recode.bcf". By default, the INFO fields are removed from the output file, as the INFO values may be invalidated by the recoding (e.g. the total depth may need to be recalculated if individuals are removed). This behavior may be overriden by the following options. By default, BCF files are written out as BGZF compressed files.
.RE
.PP
.B --recode-INFO 
.I <string> 
.br
.B --recode-INFO-all
.RS 2
These options can be used with the above recode options to define an INFO key name to keep in the output file. This option can be used multiple times to keep more of the INFO fields. The second option is used to keep all INFO values in the original file.
.RE
.PP
.B --contigs 
.I <string>
.RS 2
This option can be used in conjuction with the --recode-bcf when the input file does not have any contig declarations. This option expects a file name with one contig header per line. These lines are included in the output file.
.RE
.SS OUTPUT OTHER FORMATS
.RS 2
.B --012
.RS 2
This option outputs the genotypes as a large matrix. Three files are produced. The first, with suffix ".012", contains the genotypes of each individual on a separate line. Genotypes are represented as 0, 1 and 2, where the number represent that number of non-reference alleles. Missing genotypes are represented by -1. The second file, with suffix ".012.indv" details the individuals included in the main file. The third file, with suffix ".012.pos" details the site locations included in the main file.
.RE
.PP
.B --IMPUTE
.RS 2
This option outputs phased haplotypes in IMPUTE reference-panel format. As IMPUTE requires phased data, using this option also implies --phased. Unphased individuals and genotypes are therefore excluded. Only bi-allelic sites are included in the output. Using this option generates three files. The IMPUTE haplotype file has the suffix ".impute.hap", and the IMPUTE legend file has the suffix ".impute.hap.legend". The third file, with suffix ".impute.hap.indv", details the individuals included in the haplotype file, although this file is not needed by IMPUTE.
.RE
.PP
.B --ldhat
.br
.B --ldhelmet
.br
.B --ldhat-geno
.RS 2
These options output data in LDhat/LDhelmet format. This option requires the "--chr" filter option to also be used. The two first options output phased data only, and therefore also implies "--phased" be used, leading to unphased individuals and genotypes being excluded. For LDhelmet, only snps will be considered, and therefore it implies "--remove-indels". The second option treats all of the data as unphased, and therefore outputs LDhat files in genotype/unphased format. Two output files are generated with the suffixes ".ldhat.sites" and ".ldhat.locs", which correspond to the LDhat "sites" and "locs" input files respectively; for LDhelmet, the two files generated have the suffixes ".ldhelmet.snps" and ".ldhelmet.pos", which corresponds to the "SNPs" and "positions" files. 
.RE
.PP
.B --BEAGLE-GL
.br
.B --BEAGLE-PL
.RS 2
These options output genotype likelihood information for input into the BEAGLE program. The VCF file is required to contain FORMAT fields with "GL" or "PL" tags, which can generally be output by SNP callers such as the GATK. Use of this option requires a chromosome to be specified via the "--chr" option. The resulting output file has the suffix ".BEAGLE.GL" or ".BEAGLE.PL" and contains genotype likelihoods for biallelic sites. This file is suitable for input into BEAGLE via the "like=" argument.
.RE
.PP
.B --plink
.br
.B --plink-tped
.br
.B --chrom-map
.RS 2
These options output the genotype data in PLINK PED format. With the first option, two files are generated, with suffixes ".ped" and ".map". Note that only bi-allelic loci will be output. Further details of these files can be found in the PLINK documentation. 
.br
Note: The first option can be very slow on large datasets. Using the --chr option to divide up the dataset is advised, or alternatively use the --plink-tped option which outputs the files in the PLINK transposed format with suffixes ".tped" and ".tfam".
.br
For usage with variant sites in species other than humans, the --chrom-map option may be used to specify a file name that has a tab-delimited mapping of chromosome name to a desired integer value with one line per chromosome. This file must contain a mapping for every chromosome value found in the file.
.RE
.SH COMPARISON OPTIONS
These options are used to compare the original variant file to another variant file and output the results. All of the diff functions require both files to contain the same chromosomes and that the files be sorted in the same order. If one of the files contains chromosomes that the other file does not, use the --not-chr filter to remove them from the analysis.
.SS DIFF VCF FILE
.RS 2
.B --diff 
.I <filename>
.br
.B --gzdiff 
.I <filename>
.br
.B --diff-bcf 
.I <filename>
.RS 2
These options compare the original input file to this specified VCF, gzipped VCF, or BCF file. These options must be specified with one additional option described below in order to specify what type of comparison is to be performed. See the examples section for typical usage. 
.RE
.SS DIFF OPTIONS
.RS 2
.B --diff-site
.RS 2
Outputs the sites that are common / unique to each file. The output file has the suffix ".diff.sites_in_files". 
.RE
.PP
.B --diff-indv
.RS 2
Outputs the individuals that are common / unique to each file. The output file has the suffix ".diff.indv_in_files". 
.RE
.PP
.B --diff-site-discordance
.RS 2
This option calculates discordance on a site by site basis. The resulting output file has the suffix ".diff.sites". 
.RE
.PP
.B --diff-indv-discordance
.RS 2
This option calculates discordance on a per-individual basis. The resulting output file has the suffix ".diff.indv".
.RE
.PP
.B --diff-indv-map 
.I <filename>
.RS 2
This option allows the user to specify a mapping of individual IDs in the second file to those in the first file. The program expects the file to contain a tab-delimited line containing an individual's name in file one followed by that same individual's name in file two with one mapping per line. 
.RE
.PP
.B --diff-discordance-matrix
.RS 2
This option calculates a discordance matrix. This option only works with bi-allelic loci with matching alleles that are present in both files. The resulting output file has the suffix ".diff.discordance.matrix". 
.RE
.PP
.B --diff-switch-error
.RS 2
This option calculates phasing errors (specifically "switch errors"). This option creates an output file describing switch errors found between sites, with suffix ".diff.switch".
.RE
.SH AUTHORS
Adam Auton
.br
Anthony Marcketta
